#ifndef KALMAN_FILTER_H
#define KALMAN_FILTER_H

#include <opencv2/opencv.hpp>
#include <iostream>

using namespace std;
using namespace cv;

class Kalman_filter{
public:
    Kalman_filter();
    vector<double> GetnowPoint(double x, double y);

    //default: predict_error=1e-3,   compute_error=1
    void SetPredictError(double predict_error);
    void SetComputeError(double compute_error);
    void ReInitAllState();

private:
    Mat Q;
    Mat R2;
    Mat A;
    Mat H2;
    Mat Z2;
    Mat po2;
    Mat po_pre2;
    Mat x_pre2;
    Mat k_g2;
    Mat x_guji2;
    Mat S;
    Mat Y;
    double Vx;
    double Vy;
    vector<double> nowpoints2;
    list<double> x_list;
    list<double> y_list;
    double predict_error;
    double compute_error;
};



#endif // KALMAN_FILTER_H
